Spine Class
Description:
A class for creating instances of the 'Spine' record.
getLooks
Type: Function.
Description:
Returns a list of available looks for the specified Spine2D file string.
Signature:
getLooks: function(self: SpineClass, spineStr: string): {string}
Parameters:
Parameter | Type | Description |
---|---|---|
spineStr | string | The Spine2D file string to get the looks for. |
Returns:
Return Type | Description |
---|---|
table | A table of strings representing the available looks. |
getAnimations
Type: Function.
Description:
Returns a list of available animations for the specified Spine2D file string.
Signature:
getAnimations: function(self: SpineClass, spineStr: string): {string}
Parameters:
Parameter | Type | Description |
---|---|---|
spineStr | string | The Spine2D file string to get the animations for. |
Returns:
Return Type | Description |
---|---|
table | A table of strings representing the available animations. |
__call
Type: Metamethod.
Description:
Creates a new instance of 'Spine' using the specified Spine string.
Signature:
metamethod __call: function(self: SpineClass, spineStr: string): Spine | nil
Parameters:
Parameter | Type | Description |
---|---|---|
spineStr | string | The Spine file string for the new instance. A Spine file string can be a file path with the target file extention like "Spine/item" or file paths with all the related files like "Spine/item.skel |
Returns:
Return Type | Description |
---|---|
Spine | A new instance of 'Spine'. Returns nil if the Spine file could not be loaded. |
__call
Type: Metamethod.
Description:
Creates a new instance of 'Spine' using the specified skeleton file and atlas file.
Signature:
metamethod __call: function(self: SpineClass, skelFile: string, atlasFile: string): Spine | nil
Parameters:
Parameter | Type | Description |
---|---|---|
skelFile | string | the filename of the skeleton file to load. |
atlasFile | string | the filename of the atlas file to load. |
Returns:
Return Type | Description |
---|---|
Spine | a new instance of 'Spine' with the specified skeleton file and atlas file. Returns nil if the skeleton file or atlas file could not be loaded. |